<?php
namespace Ym\math\expresion;
class EngineFactory
{
    /**
     * @param $class
     * @return BCCompiler|BCEngine
     */
    public static function getInstance($class)
    {
        switch ($class){
            case 'BCEngine':
                return BCEngine::getInstance();
                break;
            case 'BCCompiler':
                return BCCompiler::getInstance();
                break;
            default:
                return BCEngine::getInstance();
        }
    }
}